package com.augurit.common.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "SYS_FILE_LINK")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SysFileLink {

	// 属性
	private Long id;		//主键
	private String entity;	//值对象名称
	private Long entityId;	//值对象主键
	private Long sysFileId;	//附件表主键
	private String memo;	//备注

	
	@Id
    @SequenceGenerator(name="SEQ_SYS_FILE_LINK", sequenceName="SEQ_SYS_FILE_LINK", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_SYS_FILE_LINK")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getEntity() {
		return entity;
	}

	public void setEntity(String entity) {
		this.entity = entity;
	}

	public Long getEntityId() {
		return entityId;
	}

	public void setEntityId(Long entityId) {
		this.entityId = entityId;
	}

	public Long getSysFileId() {
		return sysFileId;
	}

	public void setSysFileId(Long sysFileId) {
		this.sysFileId = sysFileId;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}